EditField.Mask Property

Syntax

Mask as String


Entry filter to be used during data entry. Formats the entered value and/or filters out unacceptable values on a character-by-character basis.

Uses the same mask characters as Visual Basic. See the section on Input Entry Filters in the Notes section for descriptions of the filter and formatting characters. If the user enters a character that is prohibited by the mask, it causes the ValidationError event to occur.

The EditField will autocomplete any literal mask characters for the user. If the user uses the Backspace key he/she can backup the autocompletion but only 1 character at a time.

To turn off the Mask, set it to the empty string, "".

You can set the Mask property in the Properties pane. If you use the "#" character as the first character of the mask, there is the remote possibility that it may be confused with the name of a constant. When you use a constant in the Properties pane, you precede its name with the "#" sign. If you want both a constant and a mask to be named "Example", then you should create a new constant named "poundExample" with its value set to "#Example" and assign that in the Properties pane.